/**
 * this class defines computer's properties
 * @author XFishalways
 * @ver 1.0.0
 */

package base;

/**
 * inherit the properties of the parent class "Electronics"
 */
public class Computer extends Electronics {
    private String mem_info;
    private String cpu_info;

    /**
     * invoke parent class constructor method and instance variable.
     *
     * @param initWeight
     * @param initPrice
     * @param initPower
     * @param initManufacturer
     * @param init_mem_info
     * @param init_cpu_info
     */
    public Computer(double initWeight, double initPrice, double initPower, String initManufacturer, String init_mem_info, String init_cpu_info) {
        super(initWeight, initPrice, initPower, initManufacturer);
        this.mem_info = init_mem_info;
        this.cpu_info = init_cpu_info;
    }

    /**
     * set the memory information of computers
     *
     * @param new_mem_info
     */
    public void setMem_info(String new_mem_info) {
        this.mem_info = new_mem_info;
    }

    /**
     * set the cpu information of computers
     *
     * @param new_cpu_info
     */
    public void setCpu_info(String new_cpu_info) {
        this.cpu_info = new_cpu_info;
    }

    /**
     * get the cpu information of computers
     *
     * @return
     */
    public String getCpu_info() {
        return cpu_info;
    }

    /**
     * get the memory information of computers
     *
     * @return
     */
    public String getMem_info() {
        return mem_info;
    }

    /**
     * output computer's infos
     */
    public void show_Computer() {
        System.out.println("Computer's memory info: " + this.mem_info);
        System.out.println("Computer's cpu info: " + this.cpu_info);
    }
}
